
package com.springboot.rmq.producer.bean;


public class RmqMessage {
    /**
     * 消息的topic信息
     */
    private String topic;
    /**
     * 消息的tags信息
     */
    private String tags;
    /**
     * 消息的key信息
     */
    private String key;

    /**
     * 使用使用顺序消息
     */
    private boolean isOrder;
    /**
     * 消息的body信息
     */
    private String body;


    /**
     * 顺序消息的计算标识
     */
    private String orderTag;

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public boolean isOrder() {
        return isOrder;
    }

    public void setOrder(boolean order) {
        isOrder = order;
    }

    public String getOrderTag() {
        return orderTag;
    }

    public void setOrderTag(String orderTag) {
        this.orderTag = orderTag;
    }

    /**
     * 重写tostring方法
     *
     * @return snedMsgInfo
     */
    public String toString() {
        StringBuffer strBuffer = new StringBuffer();
        strBuffer.append("RmqMessage info: topic:[").append(topic).append("]\r\n")
            .append("tags:[").append(tags).append("]\r\n")
            .append("key :[").append(key).append("]\r\n")
            .append("isOrder :[").append(isOrder).append("]\r\n")
            .append("body :[").append(body).append("]\r\n")
            .append("orderTag :[").append(orderTag).append("]\r\n");
        return strBuffer.toString();
    }
}
